home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / sound / mline / mline_hdinstall < prev    next >
Text File  |  1995-10-01  |  6KB  |  199 lines

  1. ;-------------------------------------------------
  2. ; HD Installation script for Musicline Editor 1.14
  3. ; Copyright © 1995 by Musicline.
  4. ; Written by Conny Cyreus.
  5. ;-------------------------------------------------
  6. ;$VER: Musicline Editor HDInstall 1.14 ()
  7.  
  8. ; Check kickversion.
  9. ;-------------------
  10.  
  11.   (if (< (/ (getversion) 65536) 37)
  12.    (abort "Musicline Editor will only run under Kickstart 2.04 or above!")
  13.   )
  14.  
  15. ; Select drawer.
  16. ;---------------
  17.  
  18.   (welcome)
  19.   (set @default-dest (getassign "Mline" "dva"))
  20.   (if (= @default-dest "")
  21.    (set @default-dest (getassign "MlEd" "dva"))
  22.   )
  23.   (if (= @default-dest "")
  24.    ((set @default-dest (getassign "Work" "dva"))
  25.     (if (= @default-dest "") (set @default-dest (getassign "SYS" "dva")))
  26.     (set @default-dest (askdir (prompt "Please select a drive or drawer where\nMusicline Editor should be installed!\nA drawer will be created there.")
  27.     (help "In this location a drawer will be created. All files except the libraries and the font will be installed inside this drawer.")
  28.     (default @default-dest)))
  29.     (set @default-dest (tackon @default-dest "MusiclineEditor"))
  30.    )
  31.    ((set bool (askbool (prompt "Installing Musicline Editor in\n" @default-dest) (default 1) (help @askbool-help)))
  32.     (if (= bool 0)
  33.      ((set @default-dest (getassign "SYS" "dva"))
  34.       (set @default-dest (askdir (prompt "Please select a drive or drawer where\nMusicline Editor should be installed!\nA drawer will be created there.")
  35.       (help "In this location a drawer will be created. All files except the libraries and the font will be installed inside this drawer.")
  36.       (default @default-dest)))
  37.       (set @default-dest (tackon @default-dest "MusiclineEditor"))
  38.      )
  39.     )
  40.     (working "Comparing versions of Musicline Editors.")
  41.     (set MlineNew (getversion ("MusiclineEditor/Mline")))
  42.     (set MlineOld (getversion (tackon @default-dest "Mline")))
  43.     (if (> (BITAND MlineOld) (BITAND MlineNew))
  44.      ((set MlineOldVer (/ MlineOld 65536))
  45.       (set MlineOldRev (- MlineOld (* MlineOldVer 65536)))
  46.       (set MlineNewVer (/ MlineNew 65536))
  47.       (set MlineNewRev (- MlineNew (* MlineNewVer 65536)))
  48.       (abort "You are trying to install an old version of Musicline Editor!\n"
  49.       ("Installed version  : %ld.%02ld\nVersion to install : %ld.%02ld" MlineOldVer MlineOldRev MlineNewVer MlineNewRev))
  50.      )
  51.     )
  52.    )
  53.   )
  54.  
  55. ; Delete some old files if exists.
  56. ;-----------------------------------------
  57.  
  58.   (delete (tackon @default-dest "ReadMe.Txt")
  59.   (optional force))
  60.   (delete (tackon @default-dest "ReadMe.Txt.info")
  61.   (optional force))
  62.   (delete (tackon @default-dest "History.Txt")
  63.   (optional force))
  64.   (delete (tackon @default-dest "History.Txt.info")
  65.   (optional force))
  66.   (delete (tackon @default-dest "RegistrationForm.txt")
  67.   (optional force))
  68.   (delete (tackon @default-dest "RegistrationForm.txt.info")
  69.   (optional force))
  70.   (delete (tackon @default-dest "MlEd.Doc")
  71.   (optional force))
  72.   (delete (tackon @default-dest "MlEd.Doc.info")
  73.   (optional force))
  74.   (delete (tackon @default-dest "MlEd.Config")
  75.   (optional force))
  76.   (delete (tackon @default-dest "MlEd.Config.info")
  77.   (optional force))
  78.   (delete (tackon @default-dest "MlEdEng.Guide")
  79.   (optional force))
  80.   (delete (tackon @default-dest "MlEdEng.Guide.info")
  81.   (optional force))
  82.   (delete (tackon @default-dest "MlEd")
  83.   (optional force))
  84.   (delete (tackon @default-dest "MlEd.info")
  85.   (optional force))
  86.  
  87. ; Copy Musicline Editor files to main dir.
  88. ;-----------------------------------------
  89.  
  90.   (working "Checking for Mline files.")
  91.   (copyfiles (prompt "Install Musicline Editor.")
  92.    (source "MusiclineEditor")
  93.    (dest @default-dest)
  94.    (pattern "#?")
  95.    (files)
  96.    (infos)
  97.    (optional fail)
  98.    (confirm)
  99.    (help @copyfiles-help)
  100.   )
  101.   (set Destination (substr @default-dest 0 (- (strlen @default-dest) 15)))
  102.   (set Musicline (substr @default-dest (- (strlen @default-dest) 15) 15))
  103.   (if (= Musicline "MusiclineEditor")
  104.    (copyfiles (source "") (dest Destination) (pattern "MusiclineEditor.info") (files) (optional nofail))
  105.   )
  106.  
  107. ; Copy Instruments.
  108. ;------------------
  109.  
  110.   (working "Checking for instruments.")
  111.   (makedir (tackon @default-dest "Instruments"))
  112.   (if (= (exists "MusiclineEditor/Instruments" (noreq)) 2)
  113.    (copyfiles (prompt "Install Instruments.")
  114.     (source "MusiclineEditor/Instruments")
  115.     (dest (tackon @default-dest "Instruments"))
  116.     (all)
  117.     (optional fail force)
  118.     (confirm)
  119.     (help @copyfiles-help)
  120.    )
  121.   )
  122.  
  123. ; Copy samples.
  124. ;--------------
  125.  
  126.   (if (= (exists (tackon @default-dest "Wavesamples") (noreq)) 2)
  127.    (rename (tackon @default-dest "Wavesamples") (tackon @default-dest "Samples"))
  128.   )
  129.   (working "Checking for Samples.")
  130.   (makedir (tackon @default-dest "Samples"))
  131.   (if (= (exists "MusiclineEditor/Samples" (noreq)) 2)
  132.    (copyfiles (prompt "Installing Samples.")
  133.     (source "MusiclineEditor/Samples")
  134.     (dest (tackon @default-dest "Samples"))
  135.     (all)
  136.     (optional fail force)
  137.     (confirm)
  138.     (help @copyfiles-help)
  139.    )
  140.   )
  141.  
  142. ; Copy Waves.
  143. ;------------
  144.  
  145.   (if (= (exists (tackon @default-dest "Waveforms") (noreq)) 2)
  146.    (rename (tackon @default-dest "Waveforms") (tackon @default-dest "Waves"))
  147.   )
  148.   (working "Checking for waves.")
  149.   (makedir (tackon @default-dest "Waves"))
  150.   (if (= (exists "MusiclineEditor/Waves" (noreq)) 2)
  151.    (copyfiles (prompt "Installing Waves.")
  152.     (source "MusiclineEditor/Waves")
  153.     (dest (tackon @default-dest "Waves"))
  154.     (all)
  155.     (optional fail force)
  156.     (confirm)
  157.     (help @copyfiles-help)
  158.    )
  159.   )
  160.  
  161. ; Copy modules.
  162. ;------------------
  163.  
  164.   (working "Checking for modules.")
  165.   (makedir (tackon @default-dest "Modules"))
  166.   (if (= (exists "MusiclineEditor/Modules" (noreq)) 2)
  167.    (copyfiles (prompt "Installing Modules.")
  168.     (source "MusiclineEditor/Modules")
  169.     (dest (tackon @default-dest "Modules"))
  170.     (all)
  171.     (optional fail force)
  172.     (confirm)
  173.     (help @copyfiles-help)
  174.    )
  175.   )
  176.  
  177. ; Copy font to font:
  178. ;------------------------
  179.  
  180.   (copyfiles (prompt "Install Musicline fonts")
  181.    (source "Fonts")
  182.    (dest "Fonts:")
  183.    (all)
  184.    (optional fail force)
  185.    (confirm)
  186.    (help @copyfiles-help)
  187.   )
  188.  
  189. ; Make assign in user-startup
  190. ;----------------------------
  191.  
  192.   (startup "MusiclineEditor" (prompt "Making assign for Musicline Editor in user-startup.")
  193.    (command "Assign Mline: " (expandpath (@default-dest)))
  194.    (help @startup-help)
  195.   )
  196.  
  197.   (makeassign "Mline" @default-dest)
  198.   (exit "")
  199.